﻿//************************************************************ 
// Copyright © 2009 - 2010 Oleg Stuhin & Rostislav Haitovich
// To learn more about Mytrip.Mvc.Entyty visit 
// http://starterkitmytripmvc.codeplex.com/
// mytripmvc@gmail.com
// license: Microsoft Public License (Ms-PL) 
// ***********************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mytrip.Theme
{
    /// <summary>
    /// TabMenuElements
    /// </summary>
    public static class TabMenuElements
    {
        /// <summary>
        /// (blue, Chrome, Safari)top:62px;
        /// (blue)top:59px;
        /// (green, IE6-7)top:60px;
        /// (green)top:59px;
        /// position:absolute;
        /// float: left;
        /// </summary>
        /// <returns>static string</returns>
        public static string menucontainer()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                if (ThemeSetting.brouser == "Chrome" | ThemeSetting.brouser == "Safari")
                {
                    result.AppendLine("top:60px;");
                }
                else 
                { 
                    result.AppendLine("top:59px;"); 
                }
            }
            if (ThemeSetting.theme() == "gray")
            {
                if (ThemeSetting.brouser == "Chrome" | ThemeSetting.brouser == "Safari")
                {
                    result.AppendLine("top:60px;");
                }
                else
                {
                    result.AppendLine("top:59px;");
                }
            } 
            if (ThemeSetting.theme() == "green")
            {
                if (ThemeSetting.brouser == "IE" && ThemeSetting.majorversion < 8)
                {
                    result.AppendLine("top:58px;"); 
                }
                else
                { 
                    result.AppendLine("top:59px;");
                }

            }
            result.AppendLine("position:absolute;");
            result.AppendLine("float: left;");
            return result.ToString();
        }

        /// <summary>
        /// margin: 0;
        /// padding: 0;
        /// display: inline;
        /// text-align: left;
        /// </summary>
        /// <returns>static string</returns>
        public static string menucontainer_ul_menucontainer_ul_li()
        {
            StringBuilder result = new StringBuilder();
            result.AppendLine("margin: 0;");
            result.AppendLine("margin-right: 2px;");
            result.AppendLine("padding: 0;");
            result.AppendLine("display: inline;");
            result.AppendLine("text-align: left;");
            return result.ToString();
        }
        /// <summary>
        /// float: right;
        /// position:relative;
        /// </summary>
        /// <returns>static string</returns>
        public static string menucontainer_ul_li()
        {
            StringBuilder result = new StringBuilder();
            result.AppendLine("float: left;");
            result.AppendLine("position:relative;");
            return result.ToString();
        }
        /// <summary>
        /// (blue)border: solid 1px #4b6c9e;
        /// (blue)background-color: #e8eef4;
        /// (green)border: solid 1px #f49a24;
        /// (green)background-color: #f49a24;
        /// border-top:0;
        /// text-decoration: none;
        /// display: block;
        /// padding: 7px 17px;
        /// white-space: nowrap;
        /// </summary>
        /// <returns>static string</returns>
        public static string menucontainer_ul_li_a()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("border-bottom: 1px #4b6c9e solid;");
                result.AppendLine("background-color: #e8eef4;");
                result.AppendLine("color: #034af3;");
            }
            if (ThemeSetting.theme() == "gray")
            {
                result.AppendLine("border-bottom: 1px #000 solid;");
                result.AppendLine("background-color: #eee;");
                result.AppendLine("color: #333;");
            }
            if (ThemeSetting.theme() == "green")
            {
                result.AppendLine("border-bottom: 1px #709A30 solid;");
                result.AppendLine("background-color: #f49a24;");
                result.AppendLine("color: #fff;");
            }
            result.AppendLine("padding: 7px 17px;");
            result.AppendLine("font-weight: bold;");
            result.AppendLine("text-decoration: none;");
            result.AppendLine("display: block;");
            result.AppendLine("white-space: nowrap;");
            return result.ToString();
        }
        /// <summary>
        /// (blue)background-color: #fff;
        /// (green)background-color: #F3951B;
        /// text-decoration: none;
        /// </summary>
        /// <returns>static string</returns>
        public static string menucontainer_ul_li_a_hover()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("color: #034af3;");
                result.AppendLine("border-bottom: 1px #fff solid;");
                result.AppendLine("background-color: #fff;");
            }
            if (ThemeSetting.theme() == "gray")
            {
                result.AppendLine("color: #333;");
                result.AppendLine("border-bottom: 1px #ccc solid;");
                result.AppendLine("background-color: #ccc;");
            }
            if (ThemeSetting.theme() == "green")
            {
                result.AppendLine("color: #000;");
                result.AppendLine("border-bottom: 1px #EDEBD5 solid;");
                result.AppendLine("background-color: #EDEBD5;");
            }
            result.AppendLine("text-decoration: none;");
            return result.ToString();
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static string menuvisible_a()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("color: #034af3;");
                result.AppendLine("border-bottom: 1px #fff solid;");
                result.AppendLine("background-color: #fff;");
            }
            if (ThemeSetting.theme() == "gray")
            {
                result.AppendLine("color: #333;");
                result.AppendLine("border-bottom: 1px #ccc solid;");
                result.AppendLine("background-color: #ccc;");
            }
            if (ThemeSetting.theme() == "green")
            {
                result.AppendLine("color: #000;");
                result.AppendLine("border-bottom: 1px #EDEBD5 solid;");
                result.AppendLine("background-color: #EDEBD5;");
            }
            result.AppendLine("text-decoration: none;");
            return result.ToString();
        }
        /// <summary>
        /// display: none;
        /// position:absolute;
        /// top:24px;
        /// </summary>
        /// <returns>static string</returns>
        public static string menucontainer_ul_li_ul()
        {
            StringBuilder result = new StringBuilder();
            result.AppendLine("display: none;");
            result.AppendLine("position:absolute;");
            result.AppendLine("top:33px;");
            return result.ToString();
        }
        /// <summary>
        /// float: left;
        /// display:block;
        /// </summary>
        /// <returns>static string</returns>
        public static string menucontainer_ul_li_ul_li()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("border: 1px #4b6c9e solid;");
            }
            if (ThemeSetting.theme() == "gray")
            {
                result.AppendLine("border: 1px #000 solid;");
            }
            result.AppendLine("margin-left: 4px;");
            result.AppendLine("float: left;");
            result.AppendLine("display:block;");
            return result.ToString();
        }
        /// <summary>
        /// display:block;
        /// </summary>
        /// <returns>static string</returns>
        public static string menucontainer_ul_li_ul_li_a()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("border: 0;");
            }
            if (ThemeSetting.theme() == "gray")
            {
                result.AppendLine("border: 0;");
            }
            if (ThemeSetting.theme() == "green")
            {
                result.AppendLine("border: 1px #f49a24 solid;");
            }
            result.AppendLine("font-weight: normal;");
            result.AppendLine("padding: 2px 5px;");
            result.AppendLine("display:block;");
            return result.ToString();
        }
        public static string menucontainer_ul_li_ul_li_a_hover()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("border: 0;");
            }
            if (ThemeSetting.theme() == "gray")
            {
                result.AppendLine("border: 0;");
            }
            if (ThemeSetting.theme() == "green")
            {
                result.AppendLine("border: 1px #f49a24 solid;");
            }
            result.AppendLine("font-weight: normal;");
            result.AppendLine("padding: 2px 5px;");
            result.AppendLine("display:block;");
            return result.ToString();
        }
    }
}
